home *** CD-ROM | disk | FTP | other *** search
/ CICA 1995 August / CICA - The Ultimate Collection of Shareware for Windows (Disc 2) (August 1995).iso / disc2 / patches / symantec / rtlinc.exe / MSMOUSE.H < prev    next >
C/C++ Source or Header  |  1993-05-18  |  4KB  |  104 lines

  1. /*_ msmouse.h   Sat Jun  3 1989   Modified by: Walter Bright */
  2. /* Copyright (C) 1986-1991 by Walter Bright    */
  3. /* All Rights Reserved                */
  4. /* Written by Walter Bright            */
  5. /* Interface to Microsoft mouse driver        */
  6.  
  7. #ifndef __MSMOUSE_H
  8. #define __MSMOUSE_H 1
  9.  
  10. #if __cplusplus
  11. extern "C" {
  12. #endif
  13.  
  14. /* signal interrupt mask constants */
  15. #define MSM_SIGNALMOVE 1
  16. #define MSM_SIGNALBUTTONDOWNL 2
  17. #define MSM_SIGNALBUTTONUPL 4
  18. #define MSM_SIGNALBUTTONDOWNR 8
  19. #define MSM_SIGNALBUTTONUPR 16
  20. #define MSM_SIGNALBUTTONDOWNM 32
  21. #define MSM_SIGNALBUTTONUPM 64
  22.  
  23. /* preferred button masks, replacements for LEFT_,RIGHT_, and MIDDLE_ */
  24. #define MSM_BUTTONL 1
  25. #define MSM_BUTTONR 2
  26. #define MSM_BUTTONM 4
  27.  
  28. /* old style button masks, included for compatibility only */
  29. #define LEFT_BUTTON    1
  30. #define RIGHT_BUTTON    2
  31. #define MIDDLE_BUTTON    0    /* so middle button is never turned on    */
  32.  
  33. #ifndef _WINDOWS
  34. /* Masks for mouse buttons    */
  35.  
  36. int    __cdecl msm_init(void);
  37. void    __cdecl msm_term(void);
  38. void    __cdecl msm_showcursor(void);
  39. void    __cdecl msm_hidecursor(void);
  40. int    __cdecl msm_getstatus(unsigned *,unsigned *);
  41. void    __cdecl msm_setcurpos(unsigned,unsigned);
  42. int    __cdecl msm_getpress(unsigned *,unsigned *,unsigned *);
  43. int    __cdecl msm_getrelease(unsigned *,unsigned *,unsigned *);
  44. void    __cdecl msm_setareax(unsigned,unsigned);
  45. void    __cdecl msm_setareay(unsigned,unsigned);
  46. void    __cdecl msm_setgraphcur(int,int,int *);
  47. void    __cdecl msm_settextcur(int,int,int);
  48. void    __cdecl msm_readcounters(int *,int *);
  49. void    __cdecl msm_signal(unsigned,
  50.         void (__cdecl *)(unsigned,unsigned,unsigned,unsigned),void *);
  51. void    __cdecl msm_lightpenon(void);
  52. void    __cdecl msm_lightpenoff(void);
  53. void    __cdecl msm_setratio(unsigned,unsigned);
  54. void    __cdecl msm_condoff(unsigned,unsigned,unsigned,unsigned);
  55. void    __cdecl msm_setthreshhold(unsigned);
  56. void    __cdecl msm_reversebuttonon(void);       /* turns reversebutton feature on, can be nested */
  57. void    __cdecl msm_reversebuttonoff(void);      /* turns reversebutton feature off, can be nested */
  58. int     __cdecl msm_reversebuttonis(void);       /* returns the status of the reversebutton feature, >0 is on, <=0 is off */
  59. int     __cdecl msm_reversebutton(int);          /* used inside mouse signal handlers to reverse buttons if required */
  60. #else
  61.  
  62. #define MSM_SCROLLUP    120
  63. #define MSM_SCROLLDOWN    121
  64.  
  65. #define msm_setcurpos(A,B)
  66. #define msm_setareax(A,B)
  67. #define msm_setareay(A,B)
  68. #define msm_setgraphcur(A,B,C)
  69. #define msm_settextcur(A,B,C)
  70. #define msm_setratio(A,B)
  71. #define msm_condoff(A,B,C,D)
  72. #define msm_setthreshhold(A)
  73. #define msm_lightpenon()
  74. #define msm_lightpenoff()
  75. #define msm_showcursor()    ShowCursor(1)
  76. #define msm_hidecursor()    ShowCursor(0)
  77. short        __cdecl msm_init(void);
  78. void        __cdecl msm_term(void);
  79. unsigned short    __cdecl msm_hwndget(void);        /* returns the window handle referenced by the last mouse event */
  80. /* msm_messagemonitor is placed in the window message handling procedure
  81.  * and converts windows mouse message into the msm format
  82.  * this is only valid in Windows, and must be installed for the other
  83.  * functions to work.
  84.  */
  85. unsigned short  __cdecl msm_messagemonitor(unsigned short,unsigned short,unsigned short,unsigned long,short,short);
  86. unsigned short    __cdecl msm_getstatus(unsigned short *,unsigned short *);
  87. void        __cdecl msm_readcounters(short *,short *);
  88. short        __cdecl msm_getpress(unsigned short *,unsigned short *,unsigned short *);
  89. short        __cdecl msm_getrelease(unsigned short *,unsigned short *,unsigned short *);
  90. void        __cdecl msm_signal(unsigned short,
  91.         void (__cdecl *)(unsigned short,unsigned short,short,short),void *);
  92. void            __cdecl msm_reversebuttonon(void);       /* turns reversebutton feature on, can be nested */
  93. void            __cdecl msm_reversebuttonoff(void);      /* turns reversebutton feature off, can be nested */
  94. short           __cdecl msm_reversebuttonis(void);       /* returns the status of the reversebutton feature, >0 is on, <=0 is off */
  95. short           __cdecl msm_reversebutton(short);        /* used inside mouse signal handlers to reverse buttons if required */
  96. #endif
  97.  
  98. #if __cplusplus
  99. }
  100. #endif
  101.  
  102. #endif /* __MSMOUSE_H */
  103.  
  104.